-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mojaloop/#3984): parameterize switch id[BREAKING CHANGES] #385
Conversation
Quality Gate failedFailed conditions |
if (!hubName) { | ||
throw Error('"hubName" is not initialized. Initialize the cache first.') | ||
} | ||
if (!hubNameRegex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just calculate hubNameRegex
here based on hubName
(to avoid making it required)?, e.g.:
const { HeaderValidation } = require('@mojaloop/central-services-shared').Util
...
const hubNameRegex = HeaderValidation.getHubNameRegex(Config.HUB_NAME)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Would reduce the number of parameters there.
No description provided.